<?php echo $this->render('html-head.phtml');?>
<body id='id_body'>
  <div id='div_head_show' class="1margin-10px">
    <div class='container_12 ui-corner-all '>
      <div class='left' id='div_logo'>
        <div class="">
	  <a href='/'>
	    <div class='1left'><img src='/static/img/logo.png'/></div>
	  </a>
        </div>
	<!-- <div class='clear'></div> -->
	<div class='div_logo_title ui-corner-all'>联通请访问<a href="http://www.leke100.org">http://www.leke100.org</a></div>
      </div>

      <div class='left ui-corner-all' id='div_search'>
	<?php echo $this->render('index/search-cat.phtml');?>
      </div>
      
      <div class='right medium ui-corner-all div_content ' id='div_utility_links'>
	<?php 
	   Zend_Session::start();
	   $session = new Zend_Session_Namespace('account');
	   if (isset($session->user) && ($session->user->get("username") != '' ||
					 $session->user->get("email") != '')){ ?>
	     <span class="welcome">欢迎您，<?php echo $session->user->get("username") ? $session->user->get("username") : $session->user->get("email");?>。</span>
	<a class='a_head_link' href='/account/logout'>登出</a>
	<?php if ($session->user->get("type") == Application_Model_User::$ROLE_ADMIN){ ?>
	<a class='a_head_link' href='/admin'>管理</a>
	<?php } ?>
	<div></div>
	<a class='a_head_link' href='/user'>用户中心</a>
	<a class='a_head_link' href='/user/upload-course'>上传课程</a>
	<?php }else{?>
	<a class='a_head_link' href='/account/login'>登录</a>
	<a class='a_head_link' href='/account/register'>注册</a>
	<?php }?>

      </div>
      <div class='clear'></div>	
    </div>
  </div>

  <?php echo $this->render('index/category-body.phtml');?>

